Table View

Functions to manage camera and game view.

Functions

FadeIn(speed) Do a full-screen fade-in from black.
FadeOut(speed) Do a full-screen fade-to-black.
SetCineBars(height, speed) Move black cinematic bars in from the top and bottom of the game window.
SetFOV(angle) Set field of view.
GetFOV() Get field of view.
GetCameraType() Shows the mode of the game camera.
GetCameraRoom() Gets current room where camera is positioned.
SetPostProcessMode(effect) Sets the post-process effect mode, like negative or monochrome.
SetPostProcessStrength(strength) Sets the post-process effect strength.
SetPostProcessTint(tint) Sets the post-process tint.
GetCameraPosition() Gets current camera position.
GetCameraTarget() Gets current camera target.
PlayFlyBy(flyby) Enable FlyBy with specific ID
ResetObjCamera() Reset object camera back to Lara and deactivate object camera.
FlashScreen(color, speed) Flash screen.
GetAspectRatio() Get the display resolution's aspect ratio.


Functions

FadeIn(speed)
Do a full-screen fade-in from black.

Parameters:

  • speed float (default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
FadeOut(speed)
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.

Parameters:

  • speed float (default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
SetCineBars(height, speed)
Move black cinematic bars in from the top and bottom of the game window.

Parameters:

  • height float (default 30) Percentage of the screen to be covered
  • speed float (default 30) Coverage percent per second
SetFOV(angle)
Set field of view.

Parameters:

  • angle float in degrees (clamped to [10, 170])
GetFOV()
Get field of view.

Returns:

    float current FOV angle in degrees
GetCameraType()
Shows the mode of the game camera.

Returns:

    CameraType value used by the Main Camera.

Usage:

    LevelFuncs.OnLoop = function()
    	if (View.GetCameraType() == CameraType.Combat) then
    		--Do your Actions here.
    	end
    end
GetCameraRoom()
Gets current room where camera is positioned.

Returns:

    Room current room of the camera
SetPostProcessMode(effect)
Sets the post-process effect mode, like negative or monochrome.

Parameters:

SetPostProcessStrength(strength)
Sets the post-process effect strength.

Parameters:

  • strength float (default 1.0). How strong the effect is.
SetPostProcessTint(tint)
Sets the post-process tint.

Parameters:

  • tint Color value to use.
GetCameraPosition()
Gets current camera position.

Returns:

    Vec3 current camera position
GetCameraTarget()
Gets current camera target.

Returns:

    Vec3 current camera target
PlayFlyBy(flyby)
Enable FlyBy with specific ID

Parameters:

  • flyby short (ID of flyby)
ResetObjCamera()
Reset object camera back to Lara and deactivate object camera.
FlashScreen(color, speed)
Flash screen.

Parameters:

  • color Color (default Color(255, 255, 255))
  • speed float (default 1.0). Speed in "amount" per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
GetAspectRatio()
Get the display resolution's aspect ratio.

Returns:

    float Display resolution's aspect ratio.
generated by TEN-LDoc (a fork of LDoc 1.4.6)